import 'package:card_swiper/card_swiper.dart';
import 'package:flutter/material.dart';

Container homeBanner(List<String> banner) {
  return Container(
    height: 120,
    padding: const EdgeInsets.symmetric(horizontal: 20),
    margin: const EdgeInsets.only(top: 20),
    child: Swiper(
      itemCount: banner.length,
      autoplay: true,
      loop: true,
      pagination: const SwiperPagination(
        builder: SwiperPagination.dots,
      ),
      itemBuilder: (context, index) {
        return ClipRRect(
          borderRadius: BorderRadius.circular(4),
          child: Image.network(
            banner[index],
            fit: BoxFit.fill,
          ),
        );
      },
    ),
  );
}
